package cn.wolfcode.trip.api.controller;

import cn.wolfcode.trip.base.service.IListKeyService;
import cn.wolfcode.trip.base.service.IStrategyCatalogService;
import cn.wolfcode.trip.base.service.IStrategyDetailService;
import cn.wolfcode.trip.base.service.IStrategyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * 自动列出查询时可能出现的关键字
 */

@RestController
@RequestMapping("allSearchTitles")
public class AutoCompleteController {


    @Autowired
    private IListKeyService listKeyService;

    /**
     * 查询关键字等标题  去重
     * @return
     */
    @GetMapping
    public List<String> listAllSearchKeywords() {
        return listKeyService.listKey();
    }
}
